<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>乡村拼团全部订单</title>  
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/index.css" />
</head>
<body> 
<div class="order">
    <div class="tabber tabber02"><span class="on">全部</span><span>待收货</span><span>待通知</span><span>待核销</span><span>已核销</span></div>
    <div class="orderlist">
    	<div class="block">
            <ul>
            <volist name="store_all" id="vo">
                <li>
                	<div class="tit">订单状态<span>
                    <eq name="vo.copy_state" value="2">待收货</eq>
                    <eq name="vo.copy_state" value="3">待通知</eq>
                    <eq name="vo.copy_state" value="4">待核销</eq>
                    <eq name="vo.copy_state" value="6">已核销</eq>
                    </span></div> 
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_all[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_all[$key]['unit']);?></h2>
                            <p>
                            <eq name="vo.copy_state" value="4">
                            <span><b>{$vo['need_hx']}</b>份待核销</span>
                            <else/>
                            <span><b>{$vo['copy_num']}</b>份<eq name="vo.copy_state" value="6">已核销</eq></span>
                            </eq>
                            <span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_all[$key]['unit']);?></span></p>
                        </div>
                	</div>
<eq name="vo.copy_state" value="2"><div class="button"><input type="submit" onClick="do_have(this)" copyid="{$vo.copy_id}" value="确认收货"/></div></eq>
<eq name="vo.copy_state" value="3"><div class="button"><input type="submit" onClick="do_message(this)" style="width:100px;" copyid="{$vo.copy_id}" value="发送到货通知"/></div></eq> 
                </li>
             </volist>  
                
            </ul>
        </div>
        
    	<div class="block" style="display:none">
            <ul>
            <volist name="store_ds" id="vo">
                <li>
                	<div class="tit">订单状态<span>待收货</span></div> 
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_ds[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_ds[$key]['unit']);?></h2>
                            <p><span><b>{$vo['copy_num']}</b>份</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_ds[$key]['unit']);?></span></p>
                        </div>
                	</div>
                    <div class="button"><input type="submit" onClick="do_have(this)" copyid="{$vo.copy_id}" value="确认收货"/></div>
                </li>
             </volist>  
                
            </ul>
        </div>
    	<div class="block" style="display:none">
            <ul>
            <volist name="store_tz" id="vo">
                <li>
                	<div class="tit">订单状态<span>待通知</span></div>
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_tz[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_tz[$key]['unit']);?></h2>
                            <p><span><b>{$vo['copy_num']}</b>份</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_tz[$key]['unit']);?></span></p>
                        </div>
                	</div>
                    <div class="button"><input type="submit" onClick="do_message(this)" style="width:100px;" copyid="{$vo.copy_id}" value="发送到货通知"/></div>
                </li>
             </volist>  
                
            </ul>
        </div>
    	<div class="block" style="display:none">
            <ul>
            <volist name="store_hx" id="vo">
                <li>
                	<div class="tit">订单状态<span>待核销</span></div>
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_hx[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_hx[$key]['unit']);?></h2>
                            <p><span><b>{$vo['need_hx']}</b>份待核销</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_hx[$key]['unit']);?></span></p>
                        </div>
                	</div>
                    
                </li>
             </volist>  
            </ul>
        </div>
    	<div class="block" style="display:none">
            <ul>
            <volist name="store_yhx" id="vo">
                <li>
                	<div class="tit">订单状态<span>已核销</span></div>
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_yhx[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_yhx[$key]['unit']);?></h2>
                            <p><span><b>{$vo['copy_num']}</b>份已核销</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_yhx[$key]['unit']);?></span></p>
                        </div>
                	</div>
                    
                </li>
             </volist>  
            </ul>
        </div>
    </div>
</div>
	<script type="text/javascript" src="__PUBLIC__/Wx/js/jquery-1.9.1.js"></script>
	<script type="text/javascript">
		$('.tabber span').click(function(){ 
			$(this).addClass("on").siblings().removeClass() 
			$(".orderlist>.block").hide().eq($('.tabber span').index(this)).show(); 
		});
		//确认收货
		function do_have(a){
			$.post('__MODULE__/StoreSpellGroup/do_have/id/'+$(a).attr('copyid')+'/');
			$(a).parent().parent().remove();
			location.reload();
		}//end fun
		//发送到货通知
		function do_message(a){
			$.post('__MODULE__/StoreSpellGroup/do_message/id/'+$(a).attr('copyid')+'/');
			$(a).parent().parent().remove();
			location.reload();
		}//end fun
	</script>
</body>
</html>